smart-fun / smartGL

SmartGL is a Graphic Engine for creating Android Games and Apps. It is based on OpenGL and handles 2D Sprites and 3D Textured Objects.
Apache License 2.0
109 stars 24 forks source link

Using ShaderColor on loaded OBJ model not working #26

Closed creek23 closed 5 years ago

creek23 commented 5 years ago

Using below code: renderPassObject3D = new RenderPassObject3D(RenderPassObject3D.ShaderType.SHADER_COLOR, true, false); Is it so, that using SHADER_COLOR instead of SHADER_TEXTURE for RenderPassObject3D is not currently working? Or am I missing something in my setup?

~creek23

smart-fun commented 5 years ago

Hi.

Did you try with the sample object called "cube_color_obj.txt" ? Your object is supposed to have colors linked to every vertex.

see https://github.com/smart-fun/smartGL/blob/master/smartglapp/src/main/res/raw/cube_color_obj.txt

creek23 commented 5 years ago

Thanks for clarifying. Using that OBJ file worked.

I was using the spaceship object but did not use texture to see how it will render -- I was hoping it will be in a default shader using ShaderColor.

~creek23