Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,515 members, 7,830,528 topics. Date: Friday, 17 May 2024 at 01:41 AM

Can You Draw A 3d Scene In Opengl Without Textures - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Can You Draw A 3d Scene In Opengl Without Textures (463 Views)

I'm Having Trouble Setting Up Opengl On Vscode / C++ Opengl/direct3d 11 Developer Needed / Working On A 3D Game (2) (3) (4)

(1) (Reply) (Go Down)

Can You Draw A 3d Scene In Opengl Without Textures by MaxFrost: 10:59am On Dec 06, 2022
Please graphics programmers in The house
I'm learning opengl with sdl2 and when I try to draw a 3d shape without using The textures it just returns a blank screen. But if I use textures it works perfectly.

1 Like

Re: Can You Draw A 3d Scene In Opengl Without Textures by qtguru(m): 5:35pm On Dec 06, 2022
MaxFrost:
Please graphics programmers in The house
I'm learning opengl with sdl2 and when I try to draw a 3d shape without using The textures it just returns a blank screen. But if I use textures it works perfectly.

Wireframe mode, check there is a GL command for that

1 Like 1 Share

Re: Can You Draw A 3d Scene In Opengl Without Textures by darkdenizen: 5:45pm On Dec 06, 2022
to add to what qtguru suggested also try and manipulate the scene and geometry lighting.

if you know some javascript i would suggest you try out 3js. its what i use for web 3d
Re: Can You Draw A 3d Scene In Opengl Without Textures by qtguru(m): 5:49pm On Dec 06, 2022
darkdenizen:
to add to what qtguru suggested also try and manipulate the scene and geometry lighting.

if you know some javascript i would suggest you try out 3js. its what i use for web 3d

I think there is a mode that either draws with line or fill.

OP this is SDL and C++, mehn you're much better off on Reddit,
Re: Can You Draw A 3d Scene In Opengl Without Textures by MaxFrost: 8:07pm On Dec 06, 2022
qtguru:


Wireframe mode, check there is a GL command for that

What I mean is how I go about drawing a 3d object without filling it with textures instead filling it with plain colours

1 Like

Re: Can You Draw A 3d Scene In Opengl Without Textures by Jivi: 7:14pm On Dec 08, 2022
A simple way is to add a uniform vec4 colorYouWant in the GLSL shader and set the output color to that color. One reason you may be getting blank is probably because no texture means black and with alpha testing enabled, that will be blank.
Re: Can You Draw A 3d Scene In Opengl Without Textures by Jivi: 7:15pm On Dec 08, 2022
MaxFrost:


What I mean is how I go about drawing a 3d object without filling it with textures instead filling it with plain colours
A simple way is to add a uniform vec4 colorYouWant in the GLSL shader and set the output color to that color. One reason you may be getting blank is probably because no texture means black(vec4(0.0f, 0.0f, 0.0f, 0.0f)) and with alpha testing enabled, that will be blank.

1 Like

Re: Can You Draw A 3d Scene In Opengl Without Textures by Jivi: 7:21pm On Dec 08, 2022
And this depends on whether you are using fixed function pipeline or programmable pipeline. Fixed function pipeline is outdated and you don't need to waste time learning it. You need to use GLSL shaders and set the shader uniform as I outlined earlier.

(1) (Reply)

World’s First GPU Quantum Computing System Uses CUDA Quantum Software (NVIDIA) / How Tech Guys Receive Payment? / Experience Of Shopping Was Invented

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.