- Home /
Vertex color is not applied in plugin.
Hi, I am implementing the plugin on openGL, but simple polygon is not applied vertex color in the Game view(not Scene view).
(example)
__declspec(dllexport) void Draw(){
glBegin(GL_QUADS);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
glVertex3f(-1, 1, 0);
glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
glVertex3f( 1, 1, 0);
glColor4f(0.0f, 0.0f, 1.0f, 1.0f);
glVertex3f( 1,-1, 0);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glVertex3f(-1,-1, 0);
glEnd();
glPopMatrix();
}
Please help!
Do you know how Unity renders the quad? Are you applying some material to it? If so, I think I have the answer. :)
Answer by shintaro · Oct 25, 2011 at 06:58 AM
Thank you for your reply!
I want to use my opengl graphics library. But it could not be rendered. So I tried to implement simple polygon.
After that,I implemented my opengl 'shader' graphics library, and it could be rendered. My problem was resolved.
Thank you.
Your answer
Follow this Question
Related Questions
OpenGL Context from Plugin 1 Answer
Native Rendering Plugin with Oculus Rift 0 Answers
Native rendering plugin OpenGL device type not being set. 2 Answers
Android OpenGL error in Unity 5 but not in Unity 4.6 0 Answers
Problem, Textures updated by plugin won't behave as expected in combination with HLSL shader 2 Answers