English
Forum

opengl: rtf là ¶ between Locate

 
i see ogl print and ogl locate not! How it for me looks functions both by me somehow not correctly..
CompileMarkSeparation
 {$cleq}
include oglhelper.inc
cls
ogl("init",hwnd,0,0,0,0)
ogl("clear")
var oglFnt&:=ogl.createfont("courier new",20,true)
ogl("print",oglfnt&,"hallo welt")
ogl("print",oglfnt&,"hallo welten")
ogl("show")
waitkey
end

proc ogl.createfont

    parameters fontName$,size&,big%
    var fnt&:=create("font",fontName$,size&,0,big%,0,0)
    var oglfnt&:=ogl("BitmapFont",fnt&)
    deleteobject fnt&
    return oglfnt&

endproc


a) Why becomes Hello worlds (only me?!) not displayed?
b) Why, if I to The Prints one ogl locate write, becomes (only me?!) garkein Text displayed?
c) in the helps is unfortunately not described as Parameter for ogl locate To interpret are.

can someone help? with whom 3D-Fonts against functions everything as it should.

<offtopic>
The original-Xpse Source:
CompileMarkSeparation
!{$cleq}
//include oglhelper.inc
cls
ogl("init",hwnd,0,0,0,0)
ogl("clear")
long oglFnt:=ogl.createfont("courier new",20,true)
ogl("print",oglfnt,"hallo welt")
ogl("print",oglfnt,"hallo welten")
ogl("show")
waitkey
end

ogl.createfont (string fontName,long size,bool big) {

    long fnt:=create("font",fontName,size,0,big,0,0)
    long oglfnt:=ogl("BitmapFont",fnt)
    deleteobject fnt
    return oglfnt

}

</offtopic>
 
01/14/07  
 




Jörg
Sellmeyer
two Listviews one thereby because now testing? XPSE or whom code? XPSE have I do not and the code first paraphrase, so it runs is still not sense the thing, or?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
01/14/07  
 



there's none code umzuschreiben - It's all right neither circa XPSE. it's about whom o.G. code - the is reines XProfan. The problem is described - understand not what it you goes?!

I wrote the ogl print and locate me Problems bereitet. xpse need nobody for me testing.
 
01/14/07  
 



without paraphrase Gibts only Error
CompileMarkSeparation
cls
ogl("init",%hwnd,0,0,0,0)
ogl("clear")
var oglFnt&=ogl.createfont("courier new",20,1)
ogl("print",oglfnt&,"hallo welt")
ogl("print",oglfnt&,"hallo welten")
ogl("show")
waitkey
end

proc ogl.createfont

    parameters fontName$,size&,big%
    var fnt&=create("font",fontName$,size&,0,big%,0,0)
    var oglfnt&=ogl("BitmapFont",fnt&)
    deleteobject fnt&
    return oglfnt&

01/15/07  
 




RGH
[quote:c4654f04d2=iF]it's about whom o.G. code - the is reines XProfan[/quote:c4654f04d2]
unfortunately even not, what moreover lead, that someone without XPSE whom code without Changes not use can!

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
01/15/07  
 



is correct - I have := forget To supplant!

The code working nevertheless not How To expect?
CompileMarkSeparation
cls
ogl("init",%hwnd,0,0,0,0)
ogl("clear")
var oglFnt&=ogl.createfont("courier new",20,1)
ogl("print",oglfnt&,"hallo welt")
ogl("print",oglfnt&,"hallo welten")
ogl("show")
waitkey
end

proc ogl.createfont

    parameters fontName$,size&,big%
    var fnt&=create("font",fontName$,size&,0,big%,0,0)
    var oglfnt&=ogl("BitmapFont",fnt&)
    deleteobject fnt&
    return oglfnt&

01/15/07  
 




RGH
Hello David,
your code can't functions (at least not correctly.), and of course from two Found:

1. it missing the Origin-commands. with Bitmap-Fonts there no räumliche deep, d.h. you'll on the Z-axis on position 0 drawn. circa something on position 0 To see, must the Viewer a step go back, or. the To betrachtende subject back into space shoved go.

2. it missing the Locate-commands. without Locate-commands is the Darstellungsposition for Print-commands (mind you, It's all right here only circa OGL) vaguely. The Coordinates the Locate-Befehles correspond to whom usual X- and Y-Coordinates in OpenGL, d.h. 0,0 is exakt in the middle and where very on-screen 1,1 is depends from the Size the Z-Wertes in the Origin-commands ex.

one can itself the means so present, that in the with Z tuned distance, means on the Ursprungspunkt the OGL-world, a 2D-Area is, on The written becomes. to each write with Print must The Schreibposition tuned go. (Gleiches counts for statement of 2D-Bitmaps.)

so functions your example:
CompileMarkSeparation
cls
ogl("init",%hwnd,0,0,0,0)
ogl("clear")
oGL("Origin", 0, 0, -6)
var oglFnt&=ogl.createfont("courier new",20,1)
ogl("locate", 0, 0)
ogl("print",oglfnt&,"+ (0,0)")
ogl("locate", 1, 1)
ogl("print",oglfnt&,"+ (1,1)")
ogl("locate", -1, 1)
ogl("print",oglfnt&,"+ (-1,1)")
ogl("locate", 1, -1)
ogl("print",oglfnt&,"+ (1,-1)")
ogl("locate", -1, -1)
ogl("print",oglfnt&,"+ (-1,-1)")
ogl("locate", 2, 2)
ogl("print",oglfnt&,"+ (2,2)")
ogl("locate", -2, 2)
ogl("print",oglfnt&,"+ (-2,2)")
ogl("locate", 2, -2)
ogl("print",oglfnt&,"+ (2,-2)")
ogl("locate", -2, -2)
ogl("print",oglfnt&,"+ (-2,-2)")
ogl("show")
waitkey
end

proc ogl.createfont

    parameters fontName$,size&,big%
    var fnt&=create("font",fontName$,size&,0,big%,0,0)
    var oglfnt&=ogl("BitmapFont",fnt&)
    deleteobject fnt&
    return oglfnt&

endproc


Experimentiere a little bit with the z-worth in the Origin-commands and you becomes immediate clear, I supra umständlich To explain try!

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
01/15/07  
 



Jau - super Statement! ex so into Help - there missing these!
 
01/15/07  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.013 Views

Untitledvor 0 min.
Sven Bader07/12/21
Nico06/20/12

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