English
Forum

OGL: Yellow Cube

 

Frank
Abbing
Hi.

somehow be I with the oGL-colours not integrally pleased. How do I get whom die correctly. yellow there, without whom Beleuchtungs-effect turn off To must?
If a available Texture yellow is, Better get going still too correctly. displayed...
CompileMarkSeparation
Declare x!

Proc DrawGLScene

    oGL("Clear")
    oGL("PosMode",1)
    oGL("Move",0 , 0 , -7)
    oGL("Rotate",x!+45 , x!+45, x!+45)
    oGL("Color", 1, .9, .2, 1)
    oGL("Cuboid",2,2,2)
    oGL("Show")
    x!=x!+.25

EndProc

Cls
oGL("Init",%hwnd,1 ,1 ,1 ,1)
SetTimer 10

While 1

    waitInput
    Case %key=2:BREAK
    DrawGLScene()

EndWhile

KillTimer
End
 
07/06/06  
 




Rolf
Koch
Hmm, is correct, by me is it one hässliches hellbraun - means nauseous.
unfortunately look I still not so with the Farbwerten through, Have me with OGL zuwenig engage.
Kuck still time with OKREA because You a die erstellst and the colours then simply time ausprobierst.
 
07/06/06  
 




Frank
Abbing
Have The colours in the Testprogramm ausprobiert. Knallig yellow isn't To make, except I schalte The illumination ex. then sees but the whole scene unecht from...
any hellen colours are concerned, that is still not correctly. so.
 
07/06/06  
 



Knallgelb Gibts in Natura too only if directly one light draufscheint. can it his the You only with ambientem light probiertest?
 
07/07/06  
 




Frank
Abbing
I teste with the light, which XProfan the User anbietet. I hope, it come yet some Lichtarten hinzu.
its but now so, that a yellow Texture too as yellow To see is. an yellow colour without Texture but only as braunes something. therefore think I, there fit what not.
with own Lichtern I had only short experimentiert. If you already Experience assembled have, poste still something of it.
 
07/07/06  
 



No I have there no experience. my Info was solely hypothetisch.
 
07/07/06  
 




Frank
Abbing
so GEHTS. I forgot, for oGL-Color are too höhere values as 1 allows.
CompileMarkSeparation
Declare x!

Proc DrawGLScene

    oGL("Clear")
    oGL("PosMode",1)
    oGL("Move",0 , 0 , -7)
    oGL("Rotate",x!+45 , x!+45, x!+45)
    oGL("Color", 2, 1.8, .4, 1)
    oGL("Cuboid",2,2,2)
    oGL("Show")
    x!=x!+.25

EndProc

Cls
oGL("Init",%hwnd,1 ,1 ,1 ,1)
SetTimer 10

While 1

    waitInput
    Case %key=2:BREAK
    DrawGLScene()

EndWhile

KillTimer
End

nevertheless a Please contact Roland, yet More Lichtquellen (of them stand 8 available) vorzuinstallieren for oGL-Init.
go for oGL-Color larger ones values as 1 using, shine The Objects namely, what sure not always erwünscht is.
 
07/07/06  
 




RGH
Hello Frank,

XProfan using solely The voreingestellte standard-Lichtquelle. If you the light Change want, is the following API-function your friend:

Ogl(glColorMaterial, ~GL_FRONT_AND_BACK, ~GL_EMISSION)

The first Parameter can following values include: GL_FRONT, GL_BACK, GL_FRONT_AND_BACK (default).

The second Parameter gives The manner the Lichtes on: GL_EMISSION, GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_AMBIENT_AND_DIFFUSE (default). If the yellow beautiful bright his should, verwendest You on the best GL_EMISSION or GL_SPECULAR.

The Programmzeile bring You sinnvollerweise same behind the oGL(Init,...) under.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
07/07/06  
 




Frank
Abbing
thanks Roland!

Ups, there Have I well for a couple corners To tricky virtual. my API-try were something ausschweifender...

your suggestion through GL_EMISSION or GL_SPECULAR bring but in my case nothing one. of course are The colours now beautiful bright, for Gibts but no Schatteneffekte More. however, for the time being have I The Solution for me found (s. letztes Posting)
 
07/07/06  
 




Uwe
''Pascal''
Niemeier
Hello people!

small appendix of me:
apparently rever to Primitives (simple Flächen or Objects, from such zusammengesetzt are) others Grundeinstellungen for colours and Refexionen as for complex Objects (Kugeln, tubes, Disks etc).
whether the generally so is or only RGH-ogL Have I not yet examined.

here the proof:
CompileMarkSeparation
!
cls
ogl("init",%hwnd,0,0,0,1)
ogl("clear")
ogl("move", 1,0,-5)
ogl("quad",1,1)
ogl("move",-2,0,0)
ogl("disk",0,0.5,4)
ogl("show")
wa
/a>

BTW: This is too with usage of Textures, therefore use I with luminous Partikeln Disks as bracket and no Quads.

Workaround for Frank:
CompileMarkSeparation
!

proc glMaterial---------------------------------------------------------------

    parameters a&,b&,a!,b!,c!,d!
    declare a#
    dim a#,16
    clear a#
    long a#,0=single(a!)
    long a#,4=single(b!)
    long a#,8=single(c!)
    long a#,12=single(d!)
    ogl("glMaterialfv",a&,b&,a#)
    dispose a#
    endproc-----------------------------------------------------------------------
    Declare X!

    Proc Drawglscene

        Ogl("Clear")
        Ogl("PosMode",1)
        Ogl("Move",0 , 0 , -7)
        Ogl("Rotate",X!+45 , X!+45, X!+45)
        --half-way values of Color; but on the best try!
        glMaterial(~GL_FRONT , ~GL_SPECULAR , 0.50 , 0.45 , 0.10 , 0)
        --further possible Parameter see MSDM
        Ogl("Color", 1, .9, .2, 1)
        Ogl("Cuboid",2,2,2)
        Ogl("Show")
        X!=X!+.25

    Endproc

    Cls
    Ogl("Init",%Hwnd,1 ,1 ,1 ,1)
    Settimer 10

    While 1

        Waitinput
        Case %Key=2:Break
        Drawglscene()

    Endwhile

    Killtimer
    End

determined through Try & Error; The detailed Zusammenhänge must so did i first yet aufdröseln

HTH
Pascal
 
07/07/06  
 




Frank
Abbing
lovely, Pascal. functions just as well .
Übrigens becomes a Texture heller, if additional another helle colour (with oGL-Color) staid becomes. somehow bearing the different items More as vermutet.
 
07/07/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

895 Views

Untitledvor 0 min.
H.Brill08/08/21
Sven Bader08/06/21
Peter Max Müller10/16/17
Donnie03/20/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie